#!/bin/bash

echo "数据大屏远程配置系统启动脚本"
echo "================================"

echo "正在启动后端服务..."
cd Java
gnome-terminal --title="后端服务" -- bash -c "mvn spring-boot:run; exec bash" &
cd ..

echo "等待后端服务启动..."
sleep 10

echo "正在启动前端服务..."
cd Vue
gnome-terminal --title="前端服务" -- bash -c "npm install && npm run dev; exec bash" &
cd ..

echo ""
echo "系统启动完成！"
echo "后端服务: http://localhost:8080"
echo "前端控制面板: http://localhost:3000/control"
echo "前端大屏显示: http://localhost:3000/screen"
echo ""
echo "按任意键退出..."
read -n 1 